var assert = require('assert');
var should = require('should');
var util = require('util');
var zlib = require('zlib');
var _ = require('lodash');
var equipConf = require('../../app/config/equipConf');
var dataApi = require('../../app/libs/dataApi');
var config = require('../config');

suite('equipConf', function () {
    suite('getEquipSellGold', function () {
        test('获取装备出售价格', function () {
            equipConf.getEquipSellGold(10000, 1).should.eql(0);
        });
    });

    suite('getEquipSellGold', function () {
        test('获取装备出售价格', function () {
            equipConf.getEquipSellGold(config.equip_id, 1).should.eql(300);
        });
    });

    suite('getEquipStrengthenLvConf', function () {
        test('获取装备等级配置', function () {
            assert.equal(equipConf.getEquipStrengthenLvConf(1) != null, true);
        });
    });

    suite('getEquipTypeConf', function () {
        test('获取装备等级配置', function () {
            var equipment_type_all_conf = dataApi.equipment_type.all();
            _.each(equipment_type_all_conf, function (value, key) {
                assert.equal(equipConf.getEquipTypeConf(key) != null, true);
            });
        });
    });
});
